<div id="saler_list">
	<div id="search_area" class="right">
		<!--<select class="select" id="province_id" assign="province_id" mark="0" style="width:90px">
			<option value=0>省份</option>
			<foreach name="result.province" var="pro" key="key">
				<option value="[$pro.id]">[$pro.name]</option>
			</foreach>
		</select>
		<select class="select" id="city_id" name="city_id" mark="0" style="width:90px">
			<option value=0>城市</option>
			<foreach name="result.city" var="city" key="key">
				<option value="[$city.id]">[$city.name]</option>
			</foreach>
		</select>-->
		<input class="input" name="search_txt" id="search_txt" style="width:200px"/><input class="input" type="button" name="search_btn"  value="搜索" />
	</div>
	<div class="clear"></div>
	<div class="top_action">
		<select class="select" name="action">
			<option value="0">批量动作</option>
			<option value="/admin/admin_form/delforms">删除</option>
		</select>
		<input class="input" type="button" name="do_btn" id="do_btn" value="应用"></input>
		<select class="select" id="filter">
		    <option value="0">查看全部</option>
		</select>
		<input type="button" class="input" name="filter_btn" id="filter_btn" value="过滤"></input>
		<div class="page right">
		    <if $page_info.page.previous_url>
		        <a class='text' href='[@htmlspecialchars($page_info.page.previous_url)]'>上一页</a>
		    </if>
		    <foreach name="page_info.page.pages" key="key" var="var">
		    <if $var.page_num == $page_info.current_page>
		        <span title="第[@htmlspecialchars($var.page_num)]页">[@htmlspecialchars($var.page_num)]</span>
		        <else>
		        <a class="num" href="[@htmlspecialchars($var.page_link)]" title="第[@htmlspecialchars($var.page_num)]页">[@htmlspecialchars($var.page_num)]</a>
		    </if>
		    </foreach>
		    <if $page_info.page.next_url>
		        <a class='text' href='[@htmlspecialchars($page_info.page.next_url)]'>下一页</a>
		    </if>
		</div>
	</div>
	<table width="100%" class="fixed table">
	<thead>
		<tr>
			<th><input width="10%" type="checkbox" name="check_all"/></th>
			<th width="16%%">标题</th>
			<th width="14%">问题数量</th>
			<th width="15%">点击率</th>
			<th width="14%">完成表单率</th>
			<th width="14%">表单宽度</th>
			<th width="15%">表单高度</th>
		</tr>
	</thead>
	<tfoot>
		<tr>
			<th><input width="10%" type="checkbox" name="check_all"/></th>
			<th width="16%%">标题</th>
			<th width="14%">问题数量</th>
			<th width="15%">点击率</th>
			<th width="14%">完成表单率</th>
			<th width="14%">表单宽度</th>
			<th width="15%">表单高度</th>
		</tr>
	</tfoot>
	<tbody>
	<foreach name="result.list" var="form" key="key">
		<tr class="table_list">
		    <th><input type="checkbox" id="[$form.f_id]" value="[$form.f_id]"/></th>
			<td>[@htmlspecialchars($form.f_title)]
				<div class="row_action" num="[$form.f_key]">
					<span class="action_edit_all"><a href="/admin/admin_form/gform?key=[$form.f_key]" target="_blank" num='[$form.f_key]' >编辑</a></span>|
					<span class="action_delete"><a href="javascript:void(0)" num='[$form.f_key]'>删除</a></span>
				</div>
			</td>
			<td>[@htmlspecialchars($form.f_question_num)]</td>
			<td>[@htmlspecialchars($form.f_hit)]</td>
			<td>[@htmlspecialchars($form.f_complete)]</td>
			<td>[@htmlspecialchars($form.f_width)]</td>
			<td>[@htmlspecialchars($form.f_height)]</td>
		</tr>
	</foreach>
	</tbody>
	
	</table>
	<div class="top_action">
		<div class="page right">
		    <if $page_info.page.previous_url>
		        <a class='text' href='[@htmlspecialchars($page_info.page.previous_url)]'>上一页</a>
		    </if>
		    <foreach name="page_info.page.pages" key="key" var="var">
		    <if $var.page_num == $page_info.current_page>
		        <span title="第[@htmlspecialchars($var.page_num)]页">[@htmlspecialchars($var.page_num)]</span>
		        <else>
		        <a class="num" href="[@htmlspecialchars($var.page_link)]" title="第[@htmlspecialchars($var.page_num)]页">[@htmlspecialchars($var.page_num)]</a>
		    </if>
		    </foreach>
		    <if $page_info.page.next_url>
		        <a class='text' href='[@htmlspecialchars($page_info.page.next_url)]'>下一页</a>
		    </if>
		</div>
	</div>
</div>
<script>
$(function(){
	$.checkboxEvent();
	
	/*$("#filter_btn").click(function(e){
		e.preventDefault();
		var filter = $("#filter").val();
		if(filter == "0")
		{
			$.showPageInfo("#page_info",'请过滤条件',500,true);
		}
		else
		{
			$.getFilter(filter);
		}
		return false;
	});*/
	$("#do_btn").click(function(e){
        $.doBatchAction();
        return false;
    });
	
	$.delObject('/admin/admin_form/delform');
	
	$("[name=search_btn]").click(function(e){
		e.preventDefault();
		var $keyw  = $("#search_txt").val();
		if($key=="")
		{
			$.showPageInfo("#page_info",'请填写查询条件',500,true);
			return false;
		}
		$url = "/admin/admin_form/getforms?keyword="+$keyw;
		$.search($url);
		return false;
	});
	$.initForIe6();
})
</script>